﻿Imports System.ComponentModel

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class ucGradeMappingDetails
    Inherits UcBaseEditControl
    Implements IUcEditControl

#Region "Designer"
    'UserControl overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Me.LessonIdlbl = New System.Windows.Forms.Label()
        Me.LessonId = New org.codegen.win.controls.CGComboBox(Me.components)
        CType(Me.ErrProvider, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'LessonIdlbl
        '
        Me.LessonIdlbl.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.LessonIdlbl.Location = New System.Drawing.Point(5, 15)
        Me.LessonIdlbl.Name = "LessonIdlbl"
        Me.LessonIdlbl.Size = New System.Drawing.Size(120, 20)
        Me.LessonIdlbl.TabIndex = 0
        Me.LessonIdlbl.Text = "Lesson"
        Me.LessonIdlbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'LessonId
        '
        Me.LessonId.AssociatedLabel = Me.LessonIdlbl
        Me.LessonId.BackColor = System.Drawing.Color.LightYellow
        Me.LessonId.ErrProvider = Nothing
        Me.LessonId.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.LessonId.isMandatory = True
        Me.LessonId.Location = New System.Drawing.Point(135, 15)
        Me.LessonId.MaxLength = 255
        Me.LessonId.MaxValue = Nothing
        Me.LessonId.MinValue = Nothing
        Me.LessonId.Name = "LessonId"

        Me.LessonId.Size = New System.Drawing.Size(563, 21)
        Me.LessonId.TabIndex = 0
        '
        'ucGradeMappingDetails
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange
        Me.Controls.Add(Me.LessonIdlbl)
        Me.Controls.Add(Me.LessonId)
        Me.Name = "ucGradeMappingDetails"
        Me.Size = New System.Drawing.Size(833, 345)
        CType(Me.ErrProvider, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub



    Friend WithEvents LessonIdlbl As System.Windows.Forms.Label
    Friend WithEvents LessonId As CGComboBox


#End Region

#Region "Properties"

#End Region

#Region "Methods"

    ''' <summary>
    ''' Fills the controls on the screen from data in the object
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub _loadData() Handles Me.evLoadObjectData

        'Dim mo As GradeMapping = DirectCast(Me.ModelObject(), GradeMapping)
        'Me.LessonId.Value = mo.LessonId
        'Me.GradeFrom.value = mo.GradeFrom
        'Me.GradeTo.value = mo.GradeTo
        'Me.LetterGrade.value = mo.LetterGrade
        'Me.GradeDescription.value = mo.GradeDescription

    End Sub


    ''' <summary>
    ''' Loads the object from the database and then sets the proeperties 
    ''' of the object from values on the controls
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub _loadToObject() Handles Me.evLoadToObject

        'Dim mo As GradeMapping = DirectCast(Me.ModelObject, GradeMapping)
        'mo.LessonId = Me.LessonId.intValue
        'mo.setGradeFrom(Me.GradeFrom.Text)
        'mo.setGradeTo(Me.GradeTo.Text)
        'mo.setLetterGrade(Me.LetterGrade.Text)
        'mo.setGradeDescription(Me.GradeDescription.Text)


    End Sub



    Public Sub _InitializeControl() Handles Me.InitializeControl

        If Me.isInitialized = False Then
            'setup datasources here
            Me.LessonId.DataSource = New BusObjects.Mappers.LessonDBMapper().findAll()
            Me.LessonId.DisplayMember = "LessonDescription"
            Me.LessonId.ValueMember = "LessonId"

            Me.isInitialized = True
        End If

    End Sub

#End Region


End Class


